app:
  telegram-token: ${TELEGRAM_API_KEY}
  client:
    scrapper: ${SCRAPPER_BASE_URL:http://localhost:8080}
  retry:
    max-attempts: 3
    retry-status-codes: 500, 502, 503, 504
    type: linear
    delay-config:
      constant:
        back-off-period-millis: 1000
      linear:
        initial-interval-millis: 1000
        max-interval-millis: 5000
      exponential:
        initial-interval-millis: 1000
        multiplier: 2
        max-interval-millis: 100000
  kafka-config-info:
    bootstrap-servers: 127.0.0.1:9092,127.0.0.1:9093,127.0.0.1:9094
    updates-topic:
      name: scrapper.updates
      partitions: 2
      replicas: 2
  micrometer:
    processed-messages-counter:
      name: messages.processed
      description: Количество обработанных сообщений

spring:
  application:
    name: bot
  jackson:
    time-zone: UTC
  cache:
    jcache:
      provider: com.github.benmanes.caffeine.jcache.spi.CaffeineCachingProvider
    caffeine:
      spec: maximumSize=100000,expireAfterAccess=60s
    cache-names:
      - rate-limit-buckets-bot

bucket4j:
  enabled: true
  filters:
    - cache-name: rate-limit-buckets-bot
      url: /.*
      http-response-body: "{ \"status\": 429, \"error\": \"Too Many Requests\", \"message\": \"You have exhausted your API Request Quota\" }"
      rate-limits:
        - bandwidths:
            - capacity: 100
              time: 1
              unit: minutes
              refill-speed: interval
server:
  port: 8090

management:
  info:
    env:
      enabled: true
  server:
    port: 8091
  endpoints:
    web:
      base-path: /
      exposure:
        include: health,info,prometheus
      path-mapping:
        prometheus: metrics
  metrics:
    tags:
      application: ${spring.application.name}

info:
  name: "Link Tracker"
  description: "App for tracking links in GitHub and StackOverflow via Telegram bot"
  author: "Vladislav Grigorev"
  app:
    encoding: "UTF-8"
    java:
      source: "21"
      target: "21"

logging:
  config: classpath:log4j2-plain.xml

# http://localhost:8090/swagger-ui/index.html
